<nav class="ease2">
    <ul>
        <li class="blank-head"><a href="javascript:;"></a></li>
        <li class="area">
            <div>
                <i class="nav-icons"><img src="[{$Think.const.IMG_URL}]zb.png"</img></i>
                [{foreach userlist as $k=>$v }]
                <div id="college">[{$v.school_name}]</div>
                [{/foreach}]
            </div>
        </li>
        <div id="xgpersonal" class="button" data-type="l" style="width:110px;">完善信息</div>
        <div id="goodsfb" class="button" data-type="l" style="width:110px;">发布的商品</div>
        <div id="xggoods" class="button" data-type="l" style="width:110px;">商品信息修改</div>
        <div id="goodsdel" class="button" data-type="l" style="width:110px;">商品删除</div>
        <div id="post" class="button" data-type="l" style="width:110px;">帖子管理</div>
        <div id="msgtongzhi" class="button" data-type="l" style="width:110px;">消息通知<span style="color:red;">([{$tz}])</span></div>
        <div id="modifypw" class="button" data-type="l" style="width:110px;">修改密码</div>
        <div id="renzheng" class="button" data-type="l" style="width:110px;">认证</div>
    </ul>
</nav>
<script type="text/javascript">
    $(document).ready(function(){
        $("#xgpersonal").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/xgpersonal";
        });
        $("#modifypw").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/modifypw";
        });
        $("#goodsfb").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/goodsfb";
        });
        $("#xggoods").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/xggoods";
        });
        $("#post").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/post";
        });
        $("#goodsdel").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/goodsdel";
        });
        $("#msgtongzhi").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/msgtongzhi";
        });
        $("#renzheng").click(function () {
            window.location.href = "[{$Think.const.APP_HOME_URL}]Personal/renzheng";
        });
    });
</script>
<div class="container">
    <div style="margin:5px 0 0 500px;font-size:25px">通知：您有 <span style="color:red;">[{$tz}] </span>条未读信息
        <table id="tongzhitable" style="margin:5px 0 0px -64px;width:400px;font-size:20px;" border="1">
            [{foreach tongzhi as $k=>$v }]
            <tr style="width:400px;">
                <td style="width:200px;">通知人：[{foreach u as $k1=>$v1 }][{if $v1.am_id==$v.am_id }][{$v1.am_name}][{/if}][{/foreach}]</td>
                <td style="width:200px;"><a value="[{$v.tz_id}]" style="color:green;" href="[{$Think.const.APP_HOME_URL}]Personal/tongzhiready?tz_id=[{$v.tz_id}]">[{if $v.tz_ready=='否' }]阅读(未阅读)[{else}]阅读(已阅读)[{/if}]</a></td>
            </tr>
            [{/foreach}]
        </table>
    </div>
    <div style="margin:10px 0 300px 320px;font-size:18px;">[{$page}]</div>
</div>
<!--一个简单的jq，点击了阅读就改变阅读状态，未读变已读-->
<script type="text/javascript">
    $(document).ready(function(){
        $("#tongzhitable a").click(function(e){
            var tz_id = $(e.target).attr('value');
            /*用一个ajax把获取到的数据发送到后端去更新*/
            $.ajax({
                type: "POST",
                url: "[{$Think.const.APP_HOME_URL}]Personal/msgtongzhi",
                data: "tz_id=" + tz_id,
                async: true, //默认为true 异步
                error: function () {
                    alert('出错');
                }
            });
        });
    });
</script>
